<!--
 * @Description: 
 * @Version: 0.0
 * @Author: taosong
 * @Date: 2023-03-25 14:52:22
 * @LastEditors: taosong
 * @LastEditTime: 2023-03-25 16:13:22
-->
<template>
  <div>
    <Button @click="visibleClick">click me</Button>
    <m-modal
      title="新建表格"
      v-model:visible="visible"
      @onOkClick="onOkClick"
      @onCancelClick="onCancelClick"
    >
      <p>Content of dialog</p>
      <p>Content of dialog</p>
      <p>Content of dialog</p>
    </m-modal>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

// 是否显示对话框
const visible = ref(false)

const visibleClick = () => {
  visible.value = true
}

// 确定
const onOkClick = () => {
  console.log('onOkClick')
}

// 取消
const onCancelClick = () => {
  console.log('onCancelClick')
}
</script>

<style scoped></style>
